*Zombie Mod Infection is a Counter-Strike server side modification that revamps the gameplay into an intense "Humans vs Zombies" survival experience. Humans must survive and kill the zombies, while zombies must slash the humans to infect them and turn them into zombies.*

This is a full and faithful decompilation and reconstruction of the classic "Zombie Mod Infection" by MysticDeath (MD). 

Following the discontinuation of Zombie Mod by apophis released on September 11 2004, MD launched a Zombie Mod server on July 1 2006. On August 19 2006, MD introduced "Zombie Mod Annihilation", a zombie swarm style mod, followed by the development and initial deployment of "Zombie Mod Infection" on April 23 2007. By early 2008, MD's Infection became the de facto premier zombie mod.

However, it was notoriously closed-source, sold for profit, and contained SteamID checks, DRM and remote backdoors. On February 23 2008, sawce cracked the leaked plugin version 3.0, NOPing out the malicious instructions and making it freely available to the internet.

Nearly 20 years later, this release takes sawce's cracked version and gracefully fixes the plugin, ensuring it runs stably on modern AMXX builds. It aims to preserve the authentic gameplay of that era while eliminating the persistent bugs and open sourcing for further tweaks.


**Features**

*   **Classic Infection:** One player is randomly chosen as the first zombie and must infect the humans before they are eliminated. Players can nominate themselves via chat command to increase their chances of being selected. The first zombie has a separate, higher health pool and can be assigned a distinct player model. Zombies can also kill humans outright, most often via backstabbing or operating preplaced turrents. Ammunition is limited and buying new clips is expensive but every bullet pins zombies in place due to its unmitigated painshock.
*   **Annihilation Mode:** A Swarm-like mode where the Terrorist team starts as zombies aiming to kill humans instead of infecting them, based on the lost sister plugin.
*   **Atmosphere:** Dynamic darkness with lightning and thunder, custom flashlights for humans to navigate the map, and immersive soundscape featuring zombie chants, infection screams, and dramatic cues for the last survivors.
*   **Customization:** Extensive admin menus and cvars to configure zombie/human stats, weapon loadouts, and flashlight properties.
*   **Random Spawning:** CSDM-spawn friendly random placement at round start.
*   **Included Utility Plugins:** Comes with an optional dedicated weapon restriction menu and a spawn point editor for easy setup on any map.

**Installation**

1. Download and extract the contents to your server's mod directory (cstrike) keeping the folder structure.
2. Compile the `.sma` files located in `addons/amxmodx/scripting/` and place the resulting `.amxx` files into `addons/amxmodx/plugins/`.
3. The mod is pre-configured to load via `plugins-zmod.ini` with itself and its two auxiliary plugins enabled.
4. (Optional) Edit `addons/amxmodx/configs/zmod_infection_md.cfg` to customize settings to your liking.
5. Restart the server or change the map.

*For the full list of admin/public commands and technical requirements, take a look at the included Zombie Mod Infection Read Me.txt file.*

**Credits**

*   **apophis** - Creating the original Zombie Mod
*   **MysticDeath** - Creating Zombie Mod Annihilation and Zombie Mod Infection
*   **Blok-13 & CaRbOn & James Gunner** - Creating maps for the mods
*   **sawce** - Cracking MD's plugin and making the amxxdump disassembler
*   **FIXXOR** - Decompiling (via lysis), reconstructing (via amxxdump) and fixing
*   **Victory & Zhidky** - Initial playtesting and bug reporting
*   **Boloxd** - Hosting Decompiled Infection on his ZRush zombie server

**Changelog**

### Bug Fixes
*   Added `#include <engine>` to fix `client_impulse` not working on AMXX 1.10.
*   Replaced custom give item function with native Fakemeta utility to prevent improper entity cleanup on AMXX 1.10.
*   Resolved persistent scoped reticle and zoom when infected while using a scoped weapon by forcing FOV and weapon updates.
*   Blocked zombies from picking up preplaced map weapons by hooking `armoury_entity` touch.
*   Fixed the force player menu targeting wrong or unconnected players by using array lookups instead of treating sequential integers as entity IDs.
*   Fixed auto-snipers weapon menu checking the wrong cvar (`human_weapon_snipers` instead of `human_weapon_auto_snipers`) for custom restrictions.
*   Fixed infections occurring after the round has ended because of delayed make_zombie task.
*   Prevented players from reverting to human immediately after being infected by adding a state check during the spawn delay.
*   Refactored the code to make the flashlight keybind work for custom flashlights with unlimited batteries as well.
*   Resolved zombie knife and first zombie models persisting after reverting to human.
*   Resolved hud message overlap by using cycling SyncHud objects.
*   Fixed missing headshot indicator in infection death messages by adding the headshot byte.
*   Fixed team balancing endlessly swapping players when counts differed by 1 because the balance threshold was unreachable.
*   Blocked removal of player entities via `amx_zmod_remove_ent` to prevent server crashes.

### Enhanced Performance
*   Moved dynamic flashlight updates out of prethink to a repeating task to prevent the dynamic light limit from being immediately reached.
*   Moved zombie model enforcement out of postthink to the infection event to prevent causing a potential network spam if a conflict arose.

### Configuration
*   Added cvars for first zombie knife model customization to complement the pre-existing first zombie player model cvar.
*   Made configuration file settings apply immediately when executed, rather than waiting for a round restart.
*   Made light style setting apply immediately mid-game using a cvar change hook on AMXX 1.9+.

### Syntax
*   Refactored light style menu cycling logic.
*   Fixed typos in grenade menu registration.

### Restored Dead Code
*   Restored uncalled `reset_players_model` function to reset player models upon becoming human.
*   Restored uncalled `RespawnSpawnDeaths` function to respawn dead players before the first zombie is picked.
*   Restored uncalled `revert_models` function to revert zombie models at round end.
*   Restored unregistered `amx_zmod_remove_ent` admin command to remove entities by class.

### Cleanup
*   Completely removed all malicious and dead code remnants.

### Extra
*   Added Annihilation Mode alongside its own cvar and admin menu entry in global settings which restarts the round.


While the plugin allows operators to enable the full arsenal and make everything bright, MD was historically played with humans restricted to pistols, shotguns, and SMGs in full darkness. Flashbangs and tactical shields were permanently disabled. Smoke grenades served as the flare equivalents, as the smoke cloud allows players to see whoever passes through it. Switchable lights also came into play since they would not be automatically turned off by the mod.

Furthermore, the maps which were played were a wide assortment of different types with very few actual zm maps in the mix, often times made specifically for MD like zm_hunt6 and zm_dust2. Camping in vents and on ledges was strictly forbidden. Since then tho, almost all zombie maps have been designed with the opposite philosophy, that of the hiding spot and the defensive perch. So outside of playing estate and mansion over and over again like they did back in the day, the map choice is slim. Some notable mentions are CS:O maps like zm_origin, zm_rest, zm_lakepark, obscure old gems like zm_sewers, zm_arabics_reborn, zm_city, Virtu-Z's zm_dust_un, zm_estate_base_fix, zm_half_force_fix and DimeX's zm_village, zm_oldstreet, zp_pollution.

In the wake of Biohazard and Zombie Plague coming out in 2008, MD would release an updated version titled "Zombie Infection XP". This iteration introduced RPG elements, including an XP system, leveling, and specialized human and zombie classes with unique abilities. Never having been open-sourced, the mod died alongside the servers it ran on, fading into oblivion even among those who fondly remember the pre XP MD era.